Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 PnL code structure alignement #442

Merged
merged 4 commits into from
Apr 12, 2024
Merged

💄 PnL code structure alignement #442

merged 4 commits into from
Apr 12, 2024

Conversation

mraniki
Copy link
Owner

@mraniki mraniki commented Apr 12, 2024

No description provided.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mraniki - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +27 to +41
Methods:
get_quote(self, instrument)
get_offer(self, instrument)
get_bid(self, instrument)
get_account_balance(self)
get_account_position(self)
calculate_pnl(self, period=None)
get_account_pnl(self, start_date)
execute_order(self, order_params)
get_trading_asset_balance(self)
get_order_amount(self, quantity, instrument, is_percentage)
pre_order_checks(self, order_params)
replace_instrument(self, instrument)
get_instrument_decimals(self, instrument)
get_trade_confirmation(self, order_params)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (code_clarification): Consider documenting method purposes in the class docstring.

While listing methods in the class docstring provides an overview, including a brief description of each method's purpose or functionality could enhance readability and maintainability.

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 70.99%. Comparing base (63bcfdf) to head (96565ba).

Files Patch % Lines
cefi/handler/client.py 50.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #442      +/-   ##
==========================================
- Coverage   71.19%   70.99%   -0.20%     
==========================================
  Files           7        7              
  Lines         427      431       +4     
==========================================
+ Hits          304      306       +2     
- Misses        123      125       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mraniki mraniki merged commit f6306ef into main Apr 12, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant